# Ubuntu环境下的Makefile

# 编译器设置
CC = gcc
CFLAGS = -Wall -Wextra -O2
LDFLAGS = 

# 目标文件和可执行文件
TARGET = phy_test
SRCS = phy_test.c
OBJS = $(SRCS:.c=.o)

# 默认目标
all: $(TARGET)

# 编译规则
$(TARGET): $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $^

%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<

# 清理规则
clean:
	rm -f $(OBJS) $(TARGET)

# 运行程序
run:
	./$(TARGET)

.PHONY: all clean run